package com.nsn.vs.sdm.util.collection;

import java.util.Collection;

/**
 * Collection helper class.
 * 
 * @author Jeccy.Zhao
 *
 */
public class UtilCollection
{
	/**
	 * 判断给定的集合类是否为空.
	 * 
	 * @param collection
	 *          集合�?
	 * @return 集合为null或�?大小�?的时候返回false, 否则返回true.
	 */
	public static boolean isNotEmpty (final Collection<? extends Object>... collections)
	{
		if (collections != null && collections.length > 0)
		{
			for (Collection<? extends Object> collection : collections)
			{
				if (!isNotEmpty(collection)) 
				{
					return false;
				}
			}
			
			return true;
		}
		
		return false;
	}
	
	public static boolean isNotEmpty (final Collection<? extends Object> collection)
	{
		return collection != null && collection.size() > 0;
	}
}
